<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of meanShift</title>
  <meta name="keywords" content="meanShift">
  <meta name="description" content="meanShift clustering algorithm.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html classify -->
<h1>meanShift
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>meanShift clustering algorithm.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [IDX,M] = meanShift(X, radius, rate, maxIter, minCsize, blur ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> meanShift clustering algorithm.

 Based on code from Sameer Agarwal &lt;sagarwal-at-cs.ucsd.edu&gt;.
 For a broad discussion see:
 Y. Cheng, Mean-shift, mode seeking, and clustering, IEEE Transactions on
 Pattern Analysis and Machine Intelligence, Vol.17, 1995, pp. 790-799

 The radius or bandwidth is tied to the 'width' of the distribution and is
 data dependent.  Note that the data should be normalized first so that
 all the dimensions have the same bandwidth.  The rate determines how
 large the gradient decent steps are.  The smaller the rate, the more
 iterations are needed for convergence, but the more likely minima are not
 overshot.  A reasonable value for the rate is .2.  Low value of the rate
 may require an increase in maxIter.  Increase maxIter until convergence
 occurs regularly for a given data set (versus the algorithm being cut off
 at maxIter).

 Note the cluster means M do not refer to the actual mean of the points
 that belong to the same cluster, but rather the values to which the
 meanShift algorithm converged for each given point (recall that cluster
 membership is based on the mean converging to the same value from
 different points).  Hence M is not the same as C, the centroid of the
 points [see kmeans2 for a definition of C].

 USAGE
  [IDX,M] = meanShift(X, radius, [rate], [maxIter], [minCsize], [blur] )

 INPUTS
  X           - column vector of data - N vectors of dim p (X is Nxp)
  radius      - the bandwidth (radius of the window)
  rate        - [] gradient descent proportionality factor in (0,1]
  maxIter     - [] maximum number of iterations
  minCsize    - [] min cluster size (smaller clusters get eliminated)
  blur        - [] if blur then at each iter data is 'blurred', ie the
                original data points move (can cause 'incorrect' results)

 OUTPUTS
  IDX         - cluster membership [see kmeans2.m]
  M           - cluster means [see above]

 EXAMPLE

 See also <a href="meanShiftIm.html" class="code" title="function [M,Vr,Vc] = meanShiftIm( X,sigSpt,sigRng,softFlag,maxIter,minDel )">MEANSHIFTIM</a>, <a href="demoCluster.html" class="code" title="">DEMOCLUSTER</a>

 Piotr's Computer Vision Matlab Toolbox      Version 2.0
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]</pre></div>





<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
